<?php
/**
 * Created by PhpStorm.
 * User: zl
 * Date: 2017/6/17
 * Time: 16:37
 * 获取待审批的报销类型：
 */

    require_once('OrdinaryFee.php');
    require_once('../Common.php');

    $sectionID = $_REQUEST['sectionID'];
    $allSection = $_REQUEST['allSection'];

    $state = $_REQUEST['state']; //是部门审批，还是签批，还是领导

    $o_fee = new OrdinaryFee();
    echo json_encode($o_fee->getOrdinaryFeeApproveBySection($sectionID, $allSection, $state));


//    $curNum = 0;
//    $fee_app = new ApproveState();
//    //全部报销
//
//    if($type == 1){
//        //仅获取差旅报销数据
//        $fee_app->getTravelFeeApprove($sectionID,$result_array, $allSection, $state);
//        judgeState($result_array);
//    }else if($type == 2){
//        //仅获取业务报销数据
//        $fee_app->getOrdinaryFeeApproveBySection($sectionID, $result_array, $allSection, $state);
//        judgeState($result_array);
//    }
//
//    $curNum = count($result_array['data']);
//    $result_array['total_count'] = $curNum;
//
//    echo json_encode($result_array);
//
//    function judgeState($result){
//        if($result['state'] == 0){
//            exit(json_encode($result));
//        }
//    }

?>